<?php

namespace App\Http\Controllers;

use App\Lib\Api;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller as BaseController;

class Controller extends BaseController
{
    protected $sourceType = '';

    protected $sourceTypeMaps = ['sell66', 'xxskins', 'skinbank'];

    public function __construct()
    {
        $request = Request::capture();
        $this->sourceType = $request->input('sourceType');
        if(empty($this->sourceType) || !in_array($this->sourceType, $this->sourceTypeMaps)){
            return Api::error(Api::CODE_PARAM_ERROR);
        }
    }
}
